package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ChangdiMapper;
import com.ruoyi.system.domain.Changdi;
import com.ruoyi.system.service.IChangdiService;

/**
 * 激活码Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-02
 */
@Service
public class ChangdiServiceImpl implements IChangdiService 
{
    @Autowired
    private ChangdiMapper changdiMapper;

    /**
     * 查询激活码
     * 
     * @param id 激活码主键
     * @return 激活码
     */
    @Override
    public Changdi selectChangdiById(Long id)
    {
        return changdiMapper.selectChangdiById(id);
    }

    /**
     * 查询激活码列表
     * 
     * @param changdi 激活码
     * @return 激活码
     */
    @Override
    public List<Changdi> selectChangdiList(Changdi changdi)
    {
        return changdiMapper.selectChangdiList(changdi);
    }

    /**
     * 新增激活码
     * 
     * @param changdi 激活码
     * @return 结果
     */
    @Override
    public int insertChangdi(Changdi changdi)
    {
        return changdiMapper.insertChangdi(changdi);
    }

    /**
     * 修改激活码
     * 
     * @param changdi 激活码
     * @return 结果
     */
    @Override
    public int updateChangdi(Changdi changdi)
    {
        return changdiMapper.updateChangdi(changdi);
    }

    /**
     * 批量删除激活码
     * 
     * @param ids 需要删除的激活码主键
     * @return 结果
     */
    @Override
    public int deleteChangdiByIds(Long[] ids)
    {
        return changdiMapper.deleteChangdiByIds(ids);
    }

    /**
     * 删除激活码信息
     * 
     * @param id 激活码主键
     * @return 结果
     */
    @Override
    public int deleteChangdiById(Long id)
    {
        return changdiMapper.deleteChangdiById(id);
    }
}
